package com.huang.weic.controller;

import com.huang.weic.bean.Play;
import com.huang.weic.service.PlayService;
import com.huang.weic.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/play")
@RestController
public class PlayController {
    @Autowired
    private PlayService playService;

    @GetMapping("/playList")
    public R getList(){
          List<Play> playList= playService.selectList();
        return R.ok().data("playList",playList);
    }
}
